public class MyInterceptorUnitTest extends TestCase {
/* (non-Javadoc)
* @see com.opensymphony.xwork.XWorkTestCase#setUp()
*/
@Override
protected void setUp() throws Exception {
ConfigurationManager.clearConfigurationProviders();
ConfigurationManager.addConfigurationProvider(new MockConfigurationProvider());
ConfigurationManager.getConfiguration().reload();
}
/**
* @throws Exception
*/
public void testShouldOnlyAllowContinuationWhenInterceptorAllows() throws Exception {
Map<String, Map><String, String>> extraContext = new HashMap<String, Map><String, String>>();
extraContext.put(ActionContext.PARAMETERS, new HashMap<String, String>());
ActionProxy proxy = ActionProxyFactory.getFactory().createActionProxy("", MockConfigurationProvider.TEST, extraContext);
assertEquals("myredirect.result", proxy.execute());
}
}